package com.yanqu.road.entity.activity.commonactivity.data;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.DataStatus;
import com.yanqu.road.entity.FieldTypeAnnotation;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

@FieldTypeAnnotation(tableName = "t_u_common_activity_auto_buy_data",desc = "万能活动自动购买数据")
public class CommonActivityAutoBuyData extends DataObject {
    @FieldTypeAnnotation(desc = "玩家ID",select = true,update = true)
    private long userId;

    @FieldTypeAnnotation(desc = "万能活动子活动类型",update = true)
    private int childType;

    @FieldTypeAnnotation(desc = "配置信息")
    private Map<String,Integer> chooseMap = new ConcurrentHashMap<>();


    public long getUserId() {
        return userId;
    }
    public void setUserId(long userId) {
        if (this.userId != userId) {
            this.userId = userId;
            setOp(DataStatus.Update);
        }
    }

    public int getChildType() {
        return childType;
    }
    public void setChildType(int childType) {
        if (this.childType != childType) {
            this.childType = childType;
            setOp(DataStatus.Update);
        }
    }

    public java.util.Map<java.lang.String, java.lang.Integer> getChooseMap() {
        return chooseMap;
    }
    public void setChooseMap(java.util.Map<java.lang.String, java.lang.Integer> chooseMap) {
        if (null == chooseMap){
            return;
        }
        if (this.chooseMap == null || !this.chooseMap.equals(chooseMap)) {
            this.chooseMap = chooseMap;
            setOp(DataStatus.Update);
        }
    }

}
